<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:45:"./application/admin/template/arctype\edit.htm";i:1585028280;s:78:"D:\phpstudy\PHPTutorial\WWW\ejs86\application\admin\template\public\layout.htm";i:1585028281;s:80:"D:\phpstudy\PHPTutorial\WWW\ejs86\application\admin\template\field\addonitem.htm";i:1585028280;s:78:"D:\phpstudy\PHPTutorial\WWW\ejs86\application\admin\template\public\footer.htm";i:1585028281;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/public/plugins/layui/css/layui.css?v=<?php echo $version; ?>" media="all">
  <link rel="stylesheet" href="/public/static/admin/css/admin.css?v=<?php echo $version; ?>" media="all">
  <link rel="stylesheet" href="/public/static/admin/css/ey_layui.css?v=<?php echo $version; ?>" media="all">
  <link rel="stylesheet" href="/public/static/admin/font/ali-font/iconfont.css?v=<?php echo $version; ?>" media="all">
  <script type="text/javascript">
    var eyou_basefile = window.location.pathname;
    var module_name = "<?php echo MODULE_NAME; ?>";
    var __root_dir__ = "";
  </script>  
  <script type="text/javascript" src="/public/static/admin/js/jquery.js?v=<?php echo $version; ?>"></script>
  <script type="text/javascript" src="/public/static/admin/js/jquery-ui/jquery-ui.min.js?v=<?php echo $version; ?>"></script>
  <script type="text/javascript" src="/public/plugins/layer-v3.1.0/layer.js?v=<?php echo $version; ?>"></script>
  <script type="text/javascript" src="/public/static/admin/js/jquery.cookie.js?v=<?php echo $version; ?>"></script>
  <script type="text/javascript" src="/public/plugins/laydate/laydate.js?v=<?php echo $version; ?>"></script>
  <script src="/public/plugins/layui/layui.js?v=<?php echo $version; ?>"></script>
  <script src="/public/static/admin/js/global.js?v=<?php echo $version; ?>"></script>
</head>
<body>
    <script type="text/javascript" src="/public/plugins/Ueditor/ueditor.config.js?v=v2.2.0"></script>
    <script type="text/javascript" src="/public/plugins/Ueditor/ueditor.all.min.js?v=v2.2.0"></script>
    <script type="text/javascript" src="/public/plugins/Ueditor/lang/zh-cn/zh-cn.js?v=v2.2.0"></script>
  <div class="layui-fluid" id="LAY-component-layer-list">
    <div class="layui-row">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="">
            <form class="layui-form" onsubmit="return false;">
              <div class="bt-close">
                <span class="layui-layer-setwin" ><a onclick="close_this();" class="layui-layer-ico layui-layer-close layui-layer-close1"></a></span>
              </div>
                <div class="layui-tab layui-tab-card">
                  <ul class="layui-tab-title">
                    <li class="layui-this">常规选项</li>
                    <li >高级选项</li>
                  </ul>
                  <div class="layui-tab-content web-system" style="padding:10px 0">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-row layui-col-space15">
                          <div class="layui-col-md12">
                            <div class="layui-card">
                              <div class="layui-card-body" pad15>
                                <div wid100 lay-filter="">
                                
                                  <div class="layui-form-item">
                                    <label class="layui-form-label"><b>*</b>栏目名称</label>
                                    <div class="layui-input-inline">
                                      <input type="text" name="typename" value="<?php echo (isset($field['typename']) && ($field['typename'] !== '')?$field['typename']:''); ?>" lay-verify="check_typename" class="layui-input">
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">保持唯一性，不可重复</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">目录名称</label>
                                    <div class="layui-input-inline">
                                        <input type="text" value="<?php echo (isset($field['dirname']) && ($field['dirname'] !== '')?$field['dirname']:''); ?>" name="dirname" id="dirname" class="layui-input" lay-verify="check_dirname" onkeyup="this.value=this.value.replace(/[^a-zA-Z0-9_]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\[^a-zA-Z0-9_]/g,''));">
                                        <div class="layui-form-inline">留空系统默认全拼音+随机数，仅支持字母、数字、下划线</div>
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">用于伪静态和静态页面生成！</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label"><b>*</b>内容模型</label>
                                    <div class="layui-input-inline">
                                     <select name="current_channel" id="current_channel" lay-verify="required" lay-filter="current_channel">
                                        <?php if(is_array($channeltype_list) || $channeltype_list instanceof \think\Collection || $channeltype_list instanceof \think\Paginator): $i = 0; $__LIST__ = $channeltype_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                        <option value="<?php echo $vo['id']; ?>" data-nid="<?php echo $vo['nid']; ?>" <?php if($field['current_channel'] == $vo['id']): ?>selected="true"<?php endif; ?>><?php echo $vo['title']; ?></option>
                                        <?php endforeach; endif; else: echo "" ;endif; ?>
                                      </select>
                                      <div class="layui-form-inline" id="notic_current_channel"></div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">所属栏目</label>
                                    <div class="layui-input-inline">
                                        <?php if($hasChildren > '0'): ?>
                                        <?php echo $select_html; ?>
                                        <input type="hidden" name="parent_id" id="parent_id" value="<?php echo (isset($field['parent_id']) && ($field['parent_id'] !== '')?$field['parent_id']:''); ?>" />
                                        <?php else: ?>
                                        <select id="parent_id" name="parent_id" lay-filter="set_grade">
                                            <?php echo $select_html; ?>
                                        </select>
                                        <?php endif; ?>
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">如果选择上级栏目，那么新增的栏目则为被选择上级栏目的子栏目</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">跳转栏目</label>
                                    <div class="layui-input-inline">
                                      <select id="pointto_id" name="pointto_id">
                                        <?php echo $select_pointto_html; ?>
                                      </select>
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">跳转栏目</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item none">
                                    <label class="layui-form-label">文件保存目录</label>
                                    <div class="layui-input-inline">
                                        <input type="text" value="<?php echo (isset($field['dirpath']) && ($field['dirpath'] !== '')?$field['dirpath']:$predirpath); ?>" name="dirpath" id="dirpath" class="layui-input" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z\/-]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^0-9a-zA-Z\/-]/g,''));">
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">生成的文章HTML页面会存放在该目录下</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">隐藏栏目</label>
                                    <div class="layui-input-inline w70">
                                        <input type="checkbox" lay-filter="is_hidden" lay-skin="switch" lay-text="是|否" <?php if($field['is_hidden'] == 1): ?> checked <?php endif; ?>>
                                        <input type="hidden" name="is_hidden" value="<?php echo $field['is_hidden']; ?>" />
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">隐藏之后，不显示在前台页面</div>
                                    </div>
                                  </div>
                                  
<?php if(is_array($addonFieldExtList) || $addonFieldExtList instanceof \think\Collection || $addonFieldExtList instanceof \think\Paginator): $i = 0; $__LIST__ = $addonFieldExtList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if(!isset($vo['ifeditable']) || $vo['ifeditable']): switch($vo['dtype']): case "hidden": ?>
                <!-- 隐藏域 start -->
                <div class="layui-form-item none">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <input type="hidden" class="layui-input" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" value="<?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:''); ?>">
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 隐藏域 start -->
            <?php break; case "text": ?>
                <!-- 单行文本框 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" value="<?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:''); ?>">
                    </div>
                    <div class="layui-input-inline layui-input-company">
                        <?php echo (isset($vo['dfvalue_unit']) && ($vo['dfvalue_unit'] !== '')?$vo['dfvalue_unit']:''); ?>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 单行文本框 end -->
            <?php break; case "multitext": ?>
                <!-- 多行文本框 start -->
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <textarea id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" class="layui-textarea"><?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:''); ?></textarea>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 多行文本框 end -->
            <?php break; case "checkbox": ?>
                <!-- 复选框 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline w500">
                        <?php if(is_array($vo['dfvalue']) || $vo['dfvalue'] instanceof \think\Collection || $vo['dfvalue'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['dfvalue'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v2): $mod = ($i % 2 );++$i;?>
                        <input type="checkbox" lay-skin="primary" lay-filter="addonFieldExt" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>][]" data-callback="func_<?php echo $vo['name']; ?>_eyempty" value="<?php echo $v2; ?>" <?php if(isset($vo['trueValue']) AND in_array($v2, $vo['trueValue'])): ?>checked="checked"<?php endif; ?> title="<?php echo $v2; ?>">
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                        <input type="hidden" name="<?php echo $vo['fieldArr']; ?>[<?php echo $vo['name']; ?>_eyempty]" value="<?php if(!empty($vo['trueValue'])): ?>1<?php else: ?>0<?php endif; ?>">
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <script type="text/javascript">
                    function func_<?php echo $vo['name']; ?>_eyempty()
                    {
                        var len = $("input[name='<?php echo $vo['fieldArr']; ?>[<?php echo $vo['name']; ?>][]']:checked").length;
                        $("input[name='<?php echo $vo['fieldArr']; ?>[<?php echo $vo['name']; ?>_eyempty]']").val(len);
                    }
                </script>
                <!-- 复选框 end -->
            <?php break; case "radio": ?>
                <!-- 单选项 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <?php if(is_array($vo['dfvalue']) || $vo['dfvalue'] instanceof \think\Collection || $vo['dfvalue'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['dfvalue'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v2): $mod = ($i % 2 );++$i;?>
                        <input type="radio" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" value="<?php echo $v2; ?>" <?php if(isset($vo['trueValue']) AND in_array($v2, $vo['trueValue'])): ?>checked="checked"<?php endif; ?> title="<?php echo $v2; ?>">
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 单选项 end -->
            <?php break; case "switch": ?>
                <!-- 开关 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-block">
                        <input type="checkbox" id="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" lay-filter="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" lay-skin="switch" lay-text="是|否" <?php if(0 != $vo['dfvalue']): ?> checked <?php endif; ?>>
                        <input type="hidden" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" value="<?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:'0'); ?>" />
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 开关 end -->
            <?php break; case "select": ?>
                <!-- 下拉框 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <select name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>">
                            <?php if(is_array($vo['dfvalue']) || $vo['dfvalue'] instanceof \think\Collection || $vo['dfvalue'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['dfvalue'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v2): $mod = ($i % 2 );++$i;?>
                            <option value="<?php echo $v2; ?>" <?php if(isset($vo['trueValue']) AND in_array($v2, $vo['trueValue'])): ?>selected<?php endif; ?>><?php echo $v2; ?></option>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </select>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 下拉框 end -->
            <?php break; case "img": ?>
                <!-- 单张图 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <div class="upload-box">
                          <div class="upload-img fl">
                            <div class="icaction none">
                              <span class="load_images">
                                 <a href="javascript:void(0);" onclick="BigImages($('#img_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local').attr('src'));">
                                 <i class="layui-icon layui-icon-search mr5"></i>查看
                                 </a>
                              </span>
                              <span class="load_images">
                                <a href="javascript:void(0);" data-inputid="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local" onclick="DelImages(this);">
                                <i class="layui-icon layui-icon-delete mr5"></i>删除
                                </a>
                              </span>
                            </div>
                            <div class="cover-bg none"></div>
                            <img id="img_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local" src="<?php echo get_default_pic($vo[$vo['name'].'_eyou_local']); ?>">
                          </div>
                          <div class="upload-right fl">
                            <button class="layui-btn test-upload-demoMore layui-btn-primary layui-btn-sm fl mb10 mr5" lay-data="{number:1,ey_inputId:'<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local',ey_savepath:'allimg'}"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                            <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-sm fl mb10" onClick="GetPictureFolder(1,'<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local');"><i class="layui-icon">&#xe64a;</i>图库</button>
                            <input name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local]" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_eyou_local" placeholder="图片地址" value="<?php echo (isset($vo[$vo['name'].'_eyou_local']) && ($vo[$vo['name'].'_eyou_local'] !== '')?$vo[$vo['name'].'_eyou_local']:''); ?>" class="layui-input">
                          </div>
                        </div>
                    </div>
                    <div class="layui-input-inline layui-btn-container" style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 单张图 end -->
            <?php break; case "imgs": ?>
                <!-- 多张图 start -->
                <div class="layui-form-item ">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline layadmin-layer-demo">
                        <button class="layui-btn multi-upload-demoMore layui-btn-sm fl" lay-data="{number:100,ey_savepath:'allimg',ey_callback:'<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_call_back'}"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                        <button class="layui-btn layui-btn-sm fl" onClick="GetPictureFolder(100,'<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>','<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_call_back');"><i class="layui-icon">&#xe64a;</i>图库</button>
                    </div>
                </div>
                <div class="layui-form-item " id="dl_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>">
                    <label class="layui-form-label"></label>
                    <div class="edit-box-con2 fl sort-list-<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>">
                        <?php if(is_array($vo[$vo['name'].'_eyou_imgupload_list']) || $vo[$vo['name'].'_eyou_imgupload_list'] instanceof \think\Collection || $vo[$vo['name'].'_eyou_imgupload_list'] instanceof \think\Paginator): $k2 = 0; $__LIST__ = $vo[$vo['name'].'_eyou_imgupload_list'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v2): $mod = ($k2 % 2 );++$k2;?>
                        <div class="images-upload">
                            <div class="upimg">
                                <input type="hidden" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>][]" value="<?php echo $v2; ?>">
                                <a class="del-bt" href="javascript:void(0);" style="color:white;" onclick="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_ClearPicArr2(this,'<?php echo $v2; ?>');">删除</a>
                                <div class="cover-bg2" style="display: block"></div>              
                                <img src="<?php echo $v2; ?>">   
                            </div>
                        </div>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </div>
                </div>
                <!-- 上传图片显示的样板 start -->
                <div class="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_upload_tpl none">
                    <div class="images-upload">
                        <div class="upimg">
                            <input type="hidden" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>][]" value="">
                            <a class="del-bt" href="javascript:void(0);" style="color:white;">&nbsp;&nbsp;</a>
                            <div class="cover-bg2" style="display: block"></div>              
                            <img src="">   
                        </div>
                    </div>
                </div>
                <!-- 上传图片显示的样板 end -->
                <script type="text/javascript">
                    // 上传多图回调函数
                    function <?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_call_back(pathObj){
                        if (Array.isArray(pathObj)){
                            var paths = pathObj;
                        }else{
                            var paths = [pathObj.url];
                        }
                        var  last_div = $(".<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_upload_tpl").html();
                        for (var i=0;i<paths.length ;i++ )
                        {
                            $("#dl_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>").find(".images-upload:eq(0)").before(last_div);  // 插入一个 新图片
                            $("#dl_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>").find(".images-upload:eq(0)").find('img').attr('src',paths[i]);// 修改他的图片路径
                            $("#dl_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>").find(".images-upload:eq(0)").find('a:eq(0)').attr('onclick',"<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_ClearPicArr2(this,'"+paths[i]+"')").text('删除');
                            $("#dl_<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>").find(".images-upload:eq(0)").find('input').val(paths[i]); // 设置隐藏域 要提交的值
                        }             
                    }

                    /*
                     * 上传之后删除组图input     
                     * @access   public
                     * @val      string  删除的图片input
                     */
                    function <?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>_ClearPicArr2(obj,path)
                    {
                        // 删除数据库记录
                        $.ajax({
                            type:'GET',
                            url:"<?php echo url('Field/del_arctypeimgs'); ?>",
                            data:{filename:path,fieldname:"<?php echo $vo['name']; ?>",typeid:"<?php echo (isset($aid) && ($aid !== '')?$aid:'0'); ?>",_ajax:1},
                            success:function(){
                                $(obj).parent().parent().remove(); // 删除完服务器的, 再删除 html上的图片
                                $.ajax({
                                    type:'GET',
                                    url:"<?php echo url('Uploadify/delupload'); ?>",
                                    data:{action:"del", filename:path,_ajax:1},
                                    success:function(){}
                                });      
                            }
                        });    
                    }

                    /** 以下 产品相册的拖动排序相关 js*/
                    $( ".sort-list-<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" ).sortable({
                        start: function( event, ui) {
                        
                        }
                        ,stop: function( event, ui ) {

                        }
                    });
                    $( ".sort-list-<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" ).disableSelection();
                </script>
                <!-- 多张图 end -->
            <?php break; case "int": ?>
                <!-- 整数类型 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" value="<?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:'0'); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" placeholder="只允许纯数字" class="layui-input" onkeyup="this.value=this.value.replace(/[^0-9]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^0-9]/g,''));">
                    </div>
                    <div class="layui-input-inline layui-input-company">
                        <?php echo (isset($vo['dfvalue_unit']) && ($vo['dfvalue_unit'] !== '')?$vo['dfvalue_unit']:''); ?>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 整数类型 end -->
            <?php break; case "float": ?>
                <!-- 小数类型 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" value="<?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:'0'); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" placeholder="允许带有小数点的数值" class="layui-input" onkeyup="this.value=this.value.replace(/[^0-9\.]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^0-9\.]/g,''));">
                    </div>
                    <div class="layui-input-inline layui-input-company">
                        <?php echo (isset($vo['dfvalue_unit']) && ($vo['dfvalue_unit'] !== '')?$vo['dfvalue_unit']:''); ?>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 小数类型 end -->
            <?php break; case "decimal": ?>
                <!-- 金额类型 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" value="<?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:'0.00'); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" placeholder="允许带有小数点的数值" class="layui-input" onkeyup="this.value=this.value.replace(/[^0-9\.]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^0-9\.]/g,''));">
                    </div>
                    <div class="layui-input-inline layui-input-company">
                        <?php echo (isset($vo['dfvalue_unit']) && ($vo['dfvalue_unit'] !== '')?$vo['dfvalue_unit']:''); ?>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <!-- 金额类型 end -->
            <?php break; case "datetime": ?>
                <!-- 日期和时间 start -->
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]" id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" value="<?php echo $vo['dfvalue']; ?>">
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <script type="text/javascript">
                    $(function () {
                        $('#<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>').layDate();   
                    });
                </script>
                <!-- 日期和时间 end -->
            <?php break; case "htmltext": ?>
                <!-- HTML文本 start -->
                <div class="layui-form-item">
                    <span class="edit-box-tit"><?php if(isset($vo['ifrequire']) AND !empty($vo['ifrequire'])): ?><b>*</b><?php endif; ?><?php echo (isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:''); ?></span>
                    <div class="edit-box-con ">
                        <div class="edit-box-textarea2">
                            <textarea id="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" data-func="<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>" name="<?php echo $vo['fieldArr']; ?>[<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>]"><?php echo (isset($vo['dfvalue']) && ($vo['dfvalue'] !== '')?$vo['dfvalue']:''); ?></textarea>
                        </div>
                    </div>
                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                        <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                        <div class="layui-form-inline2 ey_helptips_txt"><?php echo (isset($vo['remark']) && ($vo['remark'] !== '')?$vo['remark']:''); ?></div>
                    </div>
                </div>
                <script type="text/javascript">
                    UE.getEditor('<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>',{
                        serverUrl :"<?php echo url('Ueditor/index',array('savepath'=>'ueditor')); ?>",
                        zIndex: 999,
                        initialFrameWidth: "100%", //初化宽度
                        initialFrameHeight: 450, //初化高度            
                        focus: false, //初始化时，是否让编辑器获得焦点true或false
                        maximumWords: 99999,
                        removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
                        pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴，true为使用纯文本粘贴
                        autoHeightEnabled: false,
                        toolbars: ueditor_toolbars
                    });

                    //必须在提交前渲染编辑器；
                    function <?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>() {
                        //判断编辑模式状态:0表示【源代码】HTML视图；1是【设计】视图,即可见即所得；-1表示不可用
                        if(UE.getEditor("<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>").queryCommandState('source') != 0) {
                            UE.getEditor("<?php echo $vo['fieldArr']; ?>_<?php echo (isset($vo['name']) && ($vo['name'] !== '')?$vo['name']:''); ?>").execCommand('source'); //切换到【设计】视图
                        }
                    }
                </script>
                <!-- HTML文本 end -->
            <?php break; endswitch; endif; endforeach; endif; else: echo "" ;endif; ?>
                                  <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <input type="hidden" name="channeltype" id="channeltype" value="<?php echo (isset($field['channeltype']) && ($field['channeltype'] !== '')?$field['channeltype']:''); ?>" />
                                        <button class="layui-btn" lay-submit lay-filter="formSubmit">确认提交</button>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="layui-row layui-col-space15">
                          <div class="layui-col-md12">
                            <div class="layui-card">
                              <div class="layui-card-body" pad15>
                                <div wid100 lay-filter="">
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">外部链接</label>
                                    <div class="layui-input-inline w70">
                                        <input type="checkbox" lay-filter="is_part" lay-skin="switch" lay-text="开启|关闭" <?php if($field['is_part'] == 1): ?> checked <?php endif; ?>>
                                        <input type="hidden" name="is_part" value="<?php echo $field['is_part']; ?>" />
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">外部连接（在"下方文本框"处填写网址）</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item <?php if($field['is_part'] == 0): ?>none<?php endif; ?>" id="is_part1">
                                    <label class="layui-form-label"><b>*</b>URL网址</label>
                                    <div class="layui-input-inline">
                                      <input type="text" name="typelink" value="<?php echo (isset($field['typelink']) && ($field['typelink'] !== '')?$field['typelink']:''); ?>" lay-verify="check_typelink" placeholder="http://" class="layui-input">
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">请填写完整外部链接</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">英文别名</label>
                                    <div class="layui-input-inline">
                                      <input type="text" name="englist_name" value="<?php echo (isset($field['englist_name']) && ($field['englist_name'] !== '')?$field['englist_name']:''); ?>" class="layui-input">
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">显示英文名栏目的网站</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">栏目图片</label>
                                    <div class="layui-input-inline">
                                        <div class="upload-box">
                                          <div class="upload-img fl">
                                            <div class="icaction none">
                                              <span class="load_images">
                                                 <a href="javascript:void(0);" onclick="BigImages($('#img_litpic').attr('src'));">
                                                 <i class="layui-icon layui-icon-search mr5"></i>查看
                                                 </a>
                                              </span>
                                              <span class="load_images">
                                                <a href="javascript:void(0);" data-inputid="litpic" onclick="DelImages(this);">
                                                <i class="layui-icon layui-icon-delete mr5"></i>删除
                                                </a>
                                              </span>
                                            </div>
                                            <div class="cover-bg none"></div>
                                            <img id="img_litpic" src="<?php echo get_default_pic($field['litpic']); ?>">
                                          </div>
                                          <div class="upload-right fl">
                                            <button class="layui-btn test-upload-demoMore layui-btn-primary layui-btn-sm fl mb10 mr5" lay-data="{number:1,ey_inputId:'litpic',ey_savepath:'allimg'}"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                                            <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-sm fl mb10" onClick="GetPictureFolder(1,'litpic');"><i class="layui-icon">&#xe64a;</i>图库</button>
                                            <input name="litpic" id="litpic" placeholder="图片地址" value="<?php echo (isset($field['litpic']) && ($field['litpic'] !== '')?$field['litpic']:''); ?>" class="layui-input">
                                          </div>
                                        </div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item" id="dl_templist">
                                    <label class="layui-form-label" for="templist"><b>*</b>列表模板</label>
                                    <div class="layui-input-inline">
                                       <select name="templist" id="templist" lay-verify="check_templist">
                                      </select>
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">列表模板命名规则：<br/>lists_<font class="font_nid">模型标识</font>.htm<br/>lists_<font class="font_nid">模型标识</font>_自定义.htm</div>
                                    </div>
                                     <div class="layui-input-inline layadmin-layer-demo">
                                       <a class="layui-btn layui-btn-sm" data-value="lists" data-type="newtpl">新建模板</a>
                                    </div>
                                  </div>
                                  <div class="layui-form-item" id="dl_tempview">
                                    <label class="layui-form-label" for="tempview"><b>*</b>文档模板</label>
                                    <div class="layui-input-inline">
                                       <select name="tempview" id="tempview" lay-verify="check_tempview">
                                      </select>
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">文档模板命名规则：<br/>view_<font class="font_nid">模型标识</font>.htm<br/>view_<font class="font_nid">模型标识</font>_自定义.htm</div>
                                    </div>
                                     <div class="layui-input-inline layadmin-layer-demo">
                                       <a class="layui-btn layui-btn-sm" data-value="view" data-type="newtpl">新建模板</a>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <label class="layui-form-label">SEO标题</label>
                                    <div class="layui-input-inline">
                                      <input type="text" name="seo_title" value="<?php echo (isset($field['seo_title']) && ($field['seo_title'] !== '')?$field['seo_title']:''); ?>" class="layui-input">
                                    </div>
                                  </div>                        
                                  <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">SEO关键字</label>
                                    <div class="layui-input-inline">
                                      <textarea name="seo_keywords" class="layui-textarea"><?php echo (isset($field['seo_keywords']) && ($field['seo_keywords'] !== '')?$field['seo_keywords']:''); ?></textarea>
                                    </div>
                                    <div class="layui-input-inline layui-btn-container " style="width: auto;">
                                      <div class="layui-form-mid layui-word-aux ey_helptips"></div>
                                      <div class="layui-form-inline2 ey_helptips_txt">多个关键词请用英文逗号（,）隔开，建议3到5个关键词。</div>
                                    </div>
                                  </div>
                                  <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">SEO描述</label>
                                    <div class="layui-input-inline">
                                      <textarea name="seo_description" class="layui-textarea"><?php echo (isset($field['seo_description']) && ($field['seo_description'] !== '')?$field['seo_description']:''); ?></textarea>
                                    </div>
                                  </div>
                                  <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <input type="hidden" name="id" id="id" value="<?php echo (isset($field['id']) && ($field['id'] !== '')?$field['id']:''); ?>">
                                        <input type="hidden" name="grade" id="grade" value="<?php echo (isset($field['grade']) && ($field['grade'] !== '')?$field['grade']:0); ?>">
                                        <input type="hidden" name="oldgrade" id="oldgrade" value="<?php echo (isset($field['grade']) && ($field['grade'] !== '')?$field['grade']:0); ?>">
                                        <button class="layui-btn" lay-submit lay-filter="formSubmit">确认提交</button>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                     </div>
                    
                    </div>
                  </div>
                </div>
            </form>
          </div>
        </div>
     </div>
  </div>

  <script>

    $(document).ready(function(){
        // 鼠标事件，加载查看大图和删除图片
        $(".upload-img").live('mouseover', function(){
            $(this).find('div.icaction').show();
            $(this).find('div.cover-bg').show();
        }).live('mouseout', function(){
            $(this).find('div.icaction').hide();
            $(this).find('div.cover-bg').hide();
        });
    });
    
  var formNew;
  layui.config({
    base: '/public/static/admin/' //静态资源所在路径
    ,version: '<?php echo $version; ?>'
  }).extend({
    index: 'lib/index', //主入口模块
  }).use(['index', 'form', 'set'], function(){
    var $ = layui.$
    ,element = layui.element
    ,router = layui.router()
    ,layer = layui.layer
    ,form = formNew = layui.form;

    element.render();

    var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引

    var templateList = <?php echo json_encode($templateList); ?>;
    ajax_get_template();

    form.verify({
      check_typename: function(value, item){
        if(value == '' || undefined == value){
            tabchange(0)
            return '必填项不能为空';
        }
      }
      ,check_dirname: function(value, item){
        var patrn = /^\d+$/;
        if (patrn.test(value) == true) {
            tabchange(0)
            return '目录名称不能为纯数字！';
        }
      }
      ,check_typelink: function(value, item){ //value：表单的值、item：表单的DOM对象
        if ($('input[name=is_part]').val() == 1) {
            if(value == ''){
                tabchange(1);
                return '外部链接不能为空！';
            }
        }
      }
      ,check_templist: function(value, item){
        if(value == '' || undefined == value){
            tabchange(1)
            return '请选择列表模板';
        }
      }
      ,check_tempview: function(value, item){
        var channel = parseInt($('#current_channel').find('option:selected').val());
        var js_allow_channel_arr = <?php echo $js_allow_channel_arr; ?>;
        if($('#tempview').val() == '' && $.inArray(channel, js_allow_channel_arr) != -1){
            tabchange(1)
            return '请选择文档模板';
        }
      }
    }); 

    function tabchange(tabIndex)
    {
        var tabObj = $('div.layui-tab ul.layui-tab-title');
        tabObj.find('li').each(function(){
            $(this).removeClass('layui-this');
        });
        $(tabObj.find('li').get(tabIndex)).addClass('layui-this');
        $('.layui-tab-item').removeClass('layui-show');
        $($('.layui-tab-item').get(tabIndex)).addClass('layui-show');
    }

    // 监听开关
    form.on('switch', function(data){
      var elemId = data.elem.attributes['lay-filter']['nodeValue'];
      if (data.elem.checked) {
        this.value = 1;
      } else {
        this.value = 0;
      }
      $("input[name='"+elemId+"']").val(this.value);
    });

    // 监听开关
    form.on('switch(is_part)', function(data){
      var elemId = data.elem.attributes['lay-filter']['nodeValue'];
      if (data.elem.checked) {
        this.value = 1;
        $('#is_part1').show();
      } else {
        this.value = 0;
        $('#is_part1').hide();
      }
      $("input[name='"+elemId+"']").val(this.value);
    });

    form.on('select(current_channel)', function(data){
        ajax_get_template();
    });

    form.on('select(set_grade)', function(data){
        var obj = data.elem;
        var grade = parseInt($(obj).find("option:selected").attr("data-grade"));
        $('#grade').val(grade + 1);
        var dirpath = $(obj).find("option:selected").attr("data-dirpath");
        $('#dirpath').val(dirpath);
    });

    /*自定义字段的复选框*/
    form.on('checkbox(addonFieldExt)', function(data){
        try{
            var callback = data.elem.attributes['data-callback']['nodeValue'];
            eval(callback+"()");
        }catch(e){}
    });
    /*end*/

    /* 触发事件 */
    var active = {
      newtpl: function(){
        var type = $(this).data('value');
        var nid = $('#current_channel').find('option:selected').attr('data-nid');
        var url = "<?php echo url('Arctype/ajax_newtpl'); ?>";
        if (url.indexOf('?') > -1) {
            url += '&';
        } else {
            url += '?';
        }
        url += 'type='+type+'&nid='+nid;

        if ('lists' == type) {
            var title = '新建列表模板';
        } else {
            var title = '新建文档模板';
        }
        //iframe窗
        var iframes = layer.open({
            type: 2,
            title: title,
            fixed: true, //不固定
            shadeClose: false,
            shade: 0.3,
            // maxmin: true, //开启最大化最小化按钮
            area: ['90%', '90%'],
            content: url
        });
      }

    };
    $('#LAY-component-layer-list .layadmin-layer-demo .layui-btn').on('click', function(){
      var type = $(this).data('type');
      active[type] && active[type].call(this);
    });

    //监听提交
    form.on('submit(formSubmit)', function(data){
        var load = layer_loading();
        data.field._ajax = 1;
        $.ajax({
            type : 'post',
            url : "<?php echo url('Arctype/edit'); ?>",
            data : data.field,
            dataType : 'json',
            success : function(res){
                layer.close(load); //关闭loading
                if(res.code == 1){
                    layer.msg(res.msg, {icon: 1, time: 1000}, function(){
                        parent.gourl(res.url);
                    });
                }else{
                    showErrorMsg(res.msg);
                }
            },
            error: function(e){
                layer.close(load); //关闭loading
                showErrorAlert();
            }
        });
        return false;
    });

    /*根据模型ID获取模板文件名*/
    function ajax_get_template() {
        var obj = $('#current_channel');
        var channel = parseInt($(obj).find('option:selected').val());
        var js_allow_channel_arr = <?php echo $js_allow_channel_arr; ?>;
        $('#notic_current_channel').html('');

        // 重新定义模板变量，专用于新建模板功能
        $.ajax({
            url: "<?php echo url('Arctype/ajax_getTemplateList'); ?>",
            type: 'GET',
            dataType: 'JSON',
            data: {_ajax:1},
            success: function(res){
                if (res.code == 1) {
                    templateList = res.data.templateList;
                }
            }
        });
        // end

        if (templateList[channel] == undefined || templateList[channel] == '') {
            showErrorMsg('模板文件不存在！');
            return false;
        } else if (templateList[channel]['msg'] != '') {
            $('#notic_current_channel').html(templateList[channel]['msg']);
        }

        $('#templist').html(templateList[channel]['lists']);
        if ($.inArray(channel, js_allow_channel_arr) == -1) {
            if (channel == 6) {
                $('#dl_templist').find('label[for=templist]').html('<b>*</b>单页模板');
            }
            $('#dl_tempview').hide();
        } else {
            $('#dl_templist').find('label[for=templist]').html('<b>*</b>列表模板');
            $('#dl_tempview').show();
        }
        $('#tempview').html(templateList[channel]['view']);

        $('.font_nid').html(templateList[channel]['nid']);

        form.render();

        return false;
    }
    /*--end*/

  });

    function formRender()
    {
        formNew.render();
    }

  </script>

</body>
</html>
